<template>
  <div>
    <banner :list="bannerList"></banner>
    <div class="index-middle">
      <div class="img">
        <img src="~image/index-middl-img.jpg" alt="">
        <div>EYEGLASSES</div>
      </div>
      <div class="img">
        <img src="~image/index-middl-img.jpg" alt="">
        <div>EYEGLASSES</div>
      </div>
    </div>
  </div>
</template>

<script>
import banner from './components/banner'
export default {
  name: 'index',
  components: {
    banner
  },
  data () {
    return {
      bannerList: [
        require('@/assets/image/banner.png'),
        require('@/assets/image/banner.png')
      ]
    }
  },
  beforeDestroy() {
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style scoped lang="less">
.index-middle{
  overflow: hidden;
  .img{
    .mt(10);
    width:49.7%;
    float:left;
    position: relative;
    &:last-child{
      float:right;
    }
    &:hover{
      div{
        opacity: 1;
      }
    }
    img{
      width:100%;
      height:100%;
    }
    div{
      position: absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background: rgba(0,0,0,.7);
      color:#fff;
      text-align: center;
      .fs(26);
      font-weight: 700;
      justify-content: center;
      align-items: center;
      display:flex;
      opacity: 0;
      -webkit-transition: all .7s;
      transition: all .7s;
    }
  }
}
@media screen and (max-width: 500px) {
  .index-middle{
    .img{
      .mt(10);
      width:100%;
      &:last-child{
        float:left;
      }
    }
  }
}
</style>
